<template>
  <sky-base-page ref="basePageRef" :api-obj="qly.api.user.qynyh"
                 type="data" refresherEnabled padding="0 0 12rpx">
    <template #default="{dataInfo}">
      <view class="customer-card" v-for="(item,index) in dataInfo" :key="index" @tap="toRecords(item.id)">
        <view class="card-row">
          <up-avatar :src="dataInfo.headimg" shape="square" size="60"></up-avatar>

          <view class="content">
            <view>昵称：{{item.nickname}}</view>
            <view class="create_at">创建时间：{{item.create_at}}</view>
          </view>
        </view>
      </view>
      <qly-empty v-if="dataInfo.length === 0"/>
    </template>
  </sky-base-page>
</template>
<script setup>

const toRecords=(id)=>{
  qly.page.open('/pages/my/regionalUsers/userInfo',{id})
}
</script>
<style scoped lang="scss">
.customer-card {
  margin: 12rpx 24rpx;
  background: #fff;
  padding: 24rpx;
  border-radius: 12rpx;

  .card-row {
    display: flex;
    align-items: flex-start;
    line-height: 48rpx;
    gap: 16rpx;
    .content{
      height: 120rpx;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      .create_at{
        color: #909399;
      }
    }
  }
}
</style>
